Skip to content

fix(test): unpack charge_spin in test_pt2_dual_artifact_for_gnn#5523

Merged
wanghan-iapcm merged 1 commit into
deepmodeling:masterfrom
wanghan-iapcm:fix-export-with-comm-charge-spin
Jun 14, 2026
Merged

fix(test): unpack charge_spin in test_pt2_dual_artifact_for_gnn#5523
wanghan-iapcm merged 1 commit into
deepmodeling:masterfrom
wanghan-iapcm:fix-export-with-comm-charge-spin

Conversation

@wanghan-iapcm

@wanghan-iapcm wanghan-iapcm commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

#5431 extended _make_sample_inputs to return a 7th tensor (charge_spin) and updated the exported-artifact signatures accordingly, but missed test_pt2_dual_artifact_for_gnn: the test is decorated with skipif(CI == "true") (AOTInductor compile too slow for CI), so the breakage was invisible to CI and only surfaces on a local full run — ValueError: too many values to unpack (expected 6).

Fix: unpack the 7th value and pass charge_spin to both the regular and with-comm artifacts (it sits between aparam and the comm tensors in the exported signature).

Verified locally: source/tests/pt_expt/model/test_export_with_comm.py — 4 passed.

Known limitation: this test remains CI-skipped by design, so future signature changes can silently break it again; running it locally before release is the only guard.

Summary by CodeRabbit

  • Tests
    • Updated test cases to align with modified artifact interface signatures.

@dosubot dosubot Bot added the bug label Jun 12, 2026
@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 0d4ab532-f0b1-4350-8eaa-2d3ea1ad6b46

📥 Commits

Reviewing files that changed from the base of the PR and between 5d94bd6 and 2b44fc0.

📒 Files selected for processing (1)
  • source/tests/pt_expt/model/test_export_with_comm.py

📝 Walkthrough

Walkthrough

The PR updates test test_pt2_dual_artifact_for_gnn to pass charge_spin tensor to both regular and with_comm artifact calls. The test now unpacks this additional tensor from sample inputs and includes it in both artifact invocations to reflect the updated interface.

Changes

Artifact interface test synchronization

Layer / File(s) Summary
Update test invocations with charge_spin parameter
source/tests/pt_expt/model/test_export_with_comm.py
The test unpacks charge_spin from sample inputs and passes it as a positional argument to both regular and with_comm artifact calls, synchronizing the test with the updated artifact interface.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Suggested labels

Python

Suggested reviewers

  • njzjz
  • njzjz-bot
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: unpacking charge_spin in the test function test_pt2_dual_artifact_for_gnn, which is the primary modification.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@wanghan-iapcm wanghan-iapcm requested a review from njzjz June 12, 2026 17:15
@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.19%. Comparing base (0de53e9) to head (2b44fc0).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5523      +/-   ##
==========================================
- Coverage   82.19%   82.19%   -0.01%     
==========================================
  Files         891      891              
  Lines      101599   101599              
  Branches     4241     4242       +1     
==========================================
- Hits        83507    83506       -1     
  Misses      16789    16789              
- Partials     1303     1304       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wanghan-iapcm wanghan-iapcm added this pull request to the merge queue Jun 13, 2026
@wanghan-iapcm wanghan-iapcm removed this pull request from the merge queue due to a manual request Jun 13, 2026
@wanghan-iapcm wanghan-iapcm added this pull request to the merge queue Jun 13, 2026
Merged via the queue into deepmodeling:master with commit be6af67 Jun 14, 2026
72 checks passed
@wanghan-iapcm wanghan-iapcm deleted the fix-export-with-comm-charge-spin branch June 14, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants